// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLObjectImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLAlterTableDropConstraint.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"

BOOL_ptr SQLAlterTableDropConstraint::isCascade()
{
  return cascade;
}

void SQLAlterTableDropConstraint::setCascade(BOOL_ptr cascade)
{
  this->cascade = cascade;
}

BOOL_ptr SQLAlterTableDropConstraint::isRestrict()
{
  return restrict;
}

void SQLAlterTableDropConstraint::setRestrict(BOOL_ptr restrict)
{
  this->restrict = restrict;
}

// @Override
void SQLAlterTableDropConstraint::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterTableDropConstraint)))
  {
    acceptChild(visitor, this->constraintName);
  }
  visitor->endVisit(SharedObject(SQLAlterTableDropConstraint));
}

SQLName_ptr SQLAlterTableDropConstraint::getConstraintName()
{
  return constraintName;
}

void SQLAlterTableDropConstraint::setConstraintName(SQLName_ptr constraintName)
{
  this->constraintName = constraintName;
}
